import Mock from 'mockjs'
import banners from './json/banners'
import floor from './json/floors'
import pagination from './json/pagination'
Mock.mock('/mock/banners', {
    code: 200,
    "data|5": banners
})
Mock.mock('/mock/floor', {
    code: 200,
    data: floor
})
Mock.mock('/mock/pagination', 'post', function (option) {
    const {currentPage,pageSize} = JSON.parse(option.body)
    let data = `data|${pageSize}`
    return Mock.mock({
        code: 200,
        total: 20000,
        currentPage,
        pageSize,
        continuousPageNum: 10,
        [data]: pagination,
    })
})